package com.example.logprocess.processors;

import com.example.logprocess.model.LogItem;
import com.example.logprocess.repository.entity.LogEntity;
import com.example.logprocess.repository.convert.LogConvert;
import lombok.RequiredArgsConstructor;
import org.springframework.batch.item.ItemProcessor;

@RequiredArgsConstructor
public class LogProcessor implements ItemProcessor<LogItem, LogEntity> {

    private final LogConvert logConvert;
    @Override
    public LogEntity process(LogItem logItem) throws Exception {
        return logConvert.toLogEntity(logItem);
    }
}
